package com.oliver.picturebackendopenfign.feignClient;


import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
import com.oliver.picturebackendmodel.model.entity.Space;
import com.oliver.picturebackendcommon.model.vo.SpaceVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;


import java.util.Collection;
import java.util.List;

/**
* @author snow
* @description 针对表【space(空间)】的数据库操作Service
* @createDate 2024-12-19 21:20:57
*/
@FeignClient(name = "picture-backend-space-service",path = "/api/space/inner")
public interface SpaceFeignClient {

    /**
     * VO类转换
     * @param space
     * @return
     */
    @PostMapping("/get/SpaceVo")
    SpaceVO getSpaceVO(@RequestBody Space space);

    @GetMapping("/get/id")
    Space getById(@RequestParam("spaceId") Long spaceId);

    @GetMapping("/get/ids")
    List<Space> listByIds(@RequestParam("spaceIdSet") Collection<Long> spaceIdSet);

    @GetMapping("/getLambdaUpdate")
    LambdaUpdateChainWrapper<Space> lambdaUpdate();
}
